1. Field of the Invention
The present invention relates to a program rewriting system and a program rewriting method, and more particularly, to a rewriting system and a rewriting method for rewriting a program in nodes that are a plurality of control units connected to a network.
2. Description of the Related Art
Hitherto, as a program rewriting system and method (hereinafter occasionally referred to collectively as “system”) for control units connected to a network, those proposed in Japanese Patent No. 4668656, for example, have been known.
The program rewriting system of Japanese Patent No. 4668656 is described with reference to FIG. 16A and FIG. 16B. As illustrated in FIG. 16A, a first control unit 16 which has an interface function to provide an interface with the outside and executes rewriting, an overall control unit 17, a second control unit 18 with program data to be rewritten, and a plurality of third control units 19 are connected to a vehicle network 8.
The overall control unit 17 is connected to the first control unit 16, which has an interface function to provide an interface with the outside, via a gateway 17a, which has a given function. The overall control unit 17 includes storage media 17b capable of storing or saving given data and a CPU 17c for exerting overall control. The second control unit 18 with the program data to be rewritten includes storage media 18a for storing given data, a CPU 18b capable of optimum control with a given input signal, and a memory 18c. 
As illustrated in FIG. 16B, the first control unit 16 includes a data input part 16a, a storage device 16e for temporarily storing data from the data input part 16a, a CPU 16d for exerting overall control on the first control unit 16, a data output part 16c, which serves as an input/output interface with the gateway 17a, and a second interface part 16b for outputting to an output part, e.g., a display part.
When rewriting the program data of the second control unit 18 is executed in Japanese Patent No. 4668656, program rewriting data is input to the first control unit 16 from the data input part 16a. This data is output to the gateway 17a via the data output part 16c under control of the CPU 16d. The data is then sent via the gateway 17a to the overall control unit 17 to be accumulated temporarily in the storing media 17b. The program rewriting data is further transmitted to the storing media 18a of the second control unit 18 over the vehicle network 8 when a rewriting execution condition such as a voltage range and a temperature range is fulfilled.
The program rewriting system proposed in Japanese Patent No. 4668656 requires the overall control unit 17, which is one communication node, to have therein the storing media 17b, which has a capacity necessary to record all pieces of program rewriting data. A resultant problem is increased costs.
In order to solve this problem, the applicant of this patent application has proposed a program rewriting system and a program rewriting method described in Japanese Patent No. 5323151. In Japanese Patent No. 5323151, divisional or divided programs each of which is a part of a rewriting program are stored in type 2 nodes of a plurality of motor control units or the like, and each of the type 2 nodes transmits the divisional program that is stored thereon to a type 1 node of a battery control unit or the like. Each time a divisional program is received from one of the type 2 nodes, the type 1 node rewrites a part of a program for determining the operation of the type 1 node that corresponds to the received divisional program.
However, Japanese Patent No. 5323151 has a problem in that program rewriting data cannot be verified in the case where the program is damaged by a disturbance or the like after the rewriting data is recorded in a type 2 node.